import { useState } from "react";

interface IRef<T> {
  current?: T;
}
function useSelfRef<T>(initialValue?: T) {
  const [ref] = useState<IRef<T>>({ current: initialValue });

  return ref;
}

export default useSelfRef;
